package com.example.certificate.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.util.List;

@Data
@ApiModel(value = "新增路由设置")
public class InsResourceDto {

    @ApiModelProperty(value = "父级路由")
    private String parentId;

    @ApiModelProperty(value = "别名")
    private String alias;

    @ApiModelProperty(value = "页面绝对地址")
    @NotBlank(message = "页面绝对地址",groups = {AddRouter.class})
    private String component;

    @ApiModelProperty(value = "路由跳转地址")
    private String path;

    @ApiModelProperty(value = "级别(父类级别)")
    @NotBlank(message = "属性不能为空",groups = {AddRouter.class})
    private Integer sort;

    @ApiModelProperty(value = "属性")
    @NotBlank(message = "属性不能为空",groups = {AddRouter.class})
    private String metaDesc;


    @ApiModelProperty(value = "是否开启")
    @NotBlank(message = "是否开启",groups = {AddRouter.class})
    private Integer enable;

    @ApiModelProperty(value = "路由权限设置")
    private List<String> author;

    @ApiModelProperty(value = "标题")
    @NotBlank(message = "标题不能为空",groups = {AddRouter.class})
    private String label;

    public interface AddRouter{}
}
